package com.d3works.apps.account.service;

import com.d3works.apps.account.db.Journal;
import com.d3works.apps.account.db.Move;
import com.d3works.apps.base.db.Company;
import com.d3works.db.Query;
import com.d3works.exception.D3worksException;
import com.google.inject.persist.Transactional;
import java.time.LocalDate;
import java.util.List;

public interface AccountingCutOffService {

  Query<Move> getMoves(
      Company company, Journal researchJournal, LocalDate moveDate, int accountingCutOffTypeSelect);

  @Transactional(rollbackOn = {Exception.class})
  List<Move> generateCutOffMovesFromMove(
      Move move,
      Journal journal,
      LocalDate moveDate,
      LocalDate reverseMoveDate,
      String moveDescription,
      String reverseMoveDescription,
      int accountingCutOffTypeSelect,
      int cutOffMoveStatusSelect,
      boolean automaticReverse,
      boolean automaticReconcile,
      String prefixOrigin)
      throws D3worksException;

  Move generateCutOffMoveFromMove(
      Move move,
      Journal journal,
      LocalDate moveDate,
      LocalDate originMoveDate,
      String moveDescription,
      int accountingCutOffTypeSelect,
      int cutOffMoveStatusSelect,
      boolean isReverse,
      String prefixOrigin)
      throws D3worksException;
}
